from pydantic import BaseModel, Field
from typing import Optional

class MaterialPalletTypeBase(BaseModel):
    materialPalletTypeName: str = Field(..., description="托盘类型名称")

class MaterialPalletTypeCreate(MaterialPalletTypeBase):
    materialPalletTypeId: str = Field(..., description="托盘类型ID")

class MaterialPalletTypeUpdate(BaseModel):
    materialPalletTypeName: Optional[str] = None

class MaterialPalletTypeDetail(MaterialPalletTypeBase):
    materialPalletTypeId: str
    createdBy: Optional[str] = Field(None, description="创建人(后端自动生成)")
    createdAt: Optional[str] = Field(None, description="创建时间(后端自动生成)")
    updatedBy: Optional[str] = Field(None, description="更新人(后端自动生成)")
    updatedAt: Optional[str] = Field(None, description="更新时间(后端自动生成)") 